import axiosInstance from '@/request/axios-config'
import type { LoginData } from '@/interface/auth/index'

// 登录 
export const loginService = (longData: LoginData): Promise<any> =>{
    return axiosInstance.post('/auth/login', longData)
}

// 验证码校验
export const checkCode = (code: string) => {
    return axiosInstance.post('/auth/checkValidate?code=' + code)
}

//生成验证码
export const createVerifyCode = () => {
    return axiosInstance.get('/auth/getValidate')
}

// 退出登录
export const loginOutService = () => {
    return axiosInstance.get('/auth/loginOut')
}